package com.qf.openapi.web.master.service.impl;

import com.qf.openapi.web.master.dao.UserDao;
import com.qf.openapi.web.master.entity.User;
import com.qf.openapi.web.master.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;

public class UserServiceImpl implements UserService {
    @Autowired
    UserDao userDao;



    @Override
    public User getUser(Integer id) {
        User user = userDao.getUserById(1);
        System.out.println(user);
        return null;
    }

    @Override
    public boolean login(User user) {
        final String userName = user.getName();
        final String userPassword = user.getPassword();
        if (userName.equals("123")&&userPassword.equals("123")){
            return true;
        }else {
            return false;
        }

    }
}
